package com.yunhe.merchants.service.impl;

import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.merchants.constant.MyProjectConsts;
import com.yunhe.merchants.domain.MyProject;
import com.yunhe.merchants.model.FilterCondition;
import com.yunhe.merchants.model.IntentionProjectUpload;
import com.yunhe.merchants.service.ITalkService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @Author: DongWenYu
 * @Date: 2021/5/7 22:35
 */
@Service
public class TalkServiceImpl extends MyProjectServiceImpl implements ITalkService {

    private List<String> status = new ArrayList<>();

    @PostConstruct
    private void init(){
        Collections.addAll(status,MyProjectConsts.COMPANY_STATUS.Phone.value(),MyProjectConsts.COMPANY_STATUS.Visit.value()
                ,MyProjectConsts.COMPANY_STATUS.FollowUp.value(),MyProjectConsts.COMPANY_STATUS.Sign.value()
                ,MyProjectConsts.COMPANY_STATUS.Pay.value(),MyProjectConsts.COMPANY_STATUS.License.value());
    }

    @Override
    public PageResult selectByFilterCondition(FilterCondition filterCondition, Long userId, int page, int size) {
        return super.selectByFilterCondition(filterCondition,status,userId,page,size);
    }

    @Override
    public List<MyProject> export(String ids, FilterCondition filterCondition) {
        return super.export(ids,filterCondition,status);
    }
}
